<template>
 <div>
<h1>添加订单</h1>
     <p>名称<input type="text" v-model="name"></p>
     <p>数量：<input type="text" v-model="count"></p>
     <p>姓名：<input type="text" v-model="s_name"></p>
     <p>地址：<input type="text" v-model="site"></p>
     <p>电话：<input type="text" v-model="phone"></p>
     <p>内容：
         <textarea v-model="content" cols="30" rows="10"></textarea></p>
     <p><button @click="add_order">提交</button></p>
 </div>
</template>

<script>
 export default {
   data () {
     return {
         name:'',
         count:'',
         s_name:'',
         site:'',
         phone:'',
         content:'',
     }
   },
  methods: {
      add_order(){
          let fdata = new FormData()
          fdata.append("name",this.name)
          fdata.append("count",this.count)
          fdata.append("s_name",this.s_name)
          fdata.append("site",this.site)
          fdata.append("phone",this.phone)
          fdata.append("content",this.content)
          this.axios({
              url:"/app01/order/",
              method:"post",
              data:fdata
          }).then(resp=>{
              console.log(resp.data)
              
          })
      }
   }
 }
</script>

<style>

 
</style>